<template>
	<div class="container">
		<div>登录页面</div>
		<button @click="todoFn">操作组件</button>
		<son :message="message" @change="changeTitle" ref="sonRef" />
	</div>
</template>

<script setup lang="ts">
import son from '../components/son.vue'
const message = ref('我是儿子')
const changeTitle = (title) => {
	message.value = title
}
const sonRef = ref(null)

const todoFn = () => {
	sonRef.value.name = '操作操作'
	sonRef.value.message = '消息消息'
	console.log(sonRef.value.name, 'name')
	console.log(sonRef.value.message, 'message')
}
provide('message', message)
</script>

<style scoped>
.container {
	text-align: center;
}
</style>
